package com.home.qh.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.home.qh.dao.EquipmentDao;
import com.home.qh.model.Equipment;
import com.home.qh.service.EquipmentManager;

@Service("equipmentManager")
public class EquipmentManagerImpl extends GenericManagerImpl<Equipment, Long> implements	EquipmentManager {
	EquipmentDao equipmentDao;

    @Autowired
    public EquipmentManagerImpl(EquipmentDao equipmentDao) {
        super(equipmentDao);
        this.equipmentDao = equipmentDao;
    }

	public List<Equipment> getEquipmentByCodeAndName(String equipmentCode,
			String equipmentName) {
		return equipmentDao.getEquipmentByCodeAndName(equipmentCode, equipmentName);
	}

	public List<Equipment> getEquipmentByEquipment(Equipment equipment, String sort, boolean desc, int startResult, int maxResults) {
		return equipmentDao.getEquipmentByEquipment(equipment, sort, desc, startResult, maxResults);
	}
}
